#include<iostream>
using namespace std;

#define N 1000
int arr1[N];
int arr2[N];

int main()
{
	int n;
	cin >> n;
	int sum = 0;
	for (int i = 1; i <= n; i++)
		cin >> arr1[i];
	for (int i = 1; i <= n; i++)
	{
		cin >> arr2[i];
		sum += arr1[i] * arr2[i];
	}
	cout << sum << endl;
	
	return 0;
}
